<div ng-controller="lotteryActivityCtrl
">
    <div class="form-group">
        <label class="control-label">活动名称:</label>
        <input type="text" class="" ng-model="filter_activity_name" />

        <label class="control-label">小区名称:</label>
        <input type="text" class="" ng-model="filter_community_name" />

        <button type="button" class="btn-primary btn-sm  " ng-click="filter()">搜索</button>
    </div>
    <div>
        <button type="button" class="btn-primary btn-sm  " ng-click="add()">添加活动</button>
    </div>

    <div class="tab-content">
        <div class="tab-pane active" id="tab_a">
            <mutau>
                <ul class="pagination" num-pages="tasks.pageCount" current-page="tasks.currentPage"
                    on-select-page="selectPage(page)">
                    <li ng-class="{disabled: noPrevious()}"><a ng-click="selectPrevious()">&laquo;</a>

                    </li>
                    <li ng-repeat="page in pages" ng-class="{active: isActive(page)}"><a
                            ng-click="selectPage(page)">{{page}}</a>

                    </li>
                    <li ng-class="{disabled: noNext()}"><a ng-click="selectNext()">&raquo;</a>

                    </li>
                    <li ng-show="currentPage>6"><a ng-click="selectPage(1)">首页</a>

                    </li>
                </ul>
            </mutau>
            <table class="table table-condensed">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>活动名称</th>
                    <th>摇奖次数(次/人)</th>
                    <th>开始时间</th>
                    <th>结束时间</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="result in resultList">
                    <th>{{result.id}}</th>
                    <th>{{result.activity_name}}</th>
                    <th>{{result.lottery_limit}}</th>
                    <th>{{result.begin_time|date:"yyyy-MM-dd HH:mm"}}</th>
                    <th>{{result.end_time|date:"yyyy-MM-dd HH:mm"}}</th>
                    <!--<th><span ng-show="result.is_publish==0">否</span><span ng-show="result.is_publish==1">是</span></th>-->
                    <th>{{result.create_time|date:"yyyy-MM-dd HH:mm"}}</th>
                    <th>
                        <button type="button" class="btn-primary btn-sm" ng-click="getCommunitys(result.id)" >查看所属小区</button>
                        <button type="button" class="btn-primary btn-sm" ng-click="editPrize(result.id)" >设置奖品</button><br>
                        <button type="button" class="btn-primary btn-sm" ng-click="getAwardList(result.id)" >查看中奖名单</button>
                        <button type="button" class="btn-primary btn-sm" ng-click="update(result.id)" >修改</button>
                        <button type="button" class="btn-primary btn-sm" ng-click="delete(result.id)" >删除</button>
                    </th>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

